package org.example.framework;

import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Set;

public class LoadBalance {

    public static URL random(Set<URL> list){
        List<URL> urls = new ArrayList<>(list);
        Random random = new Random();
        int n = random.nextInt(urls.size());
        return urls.get(n);
    }

}
